<?php
/*分类详情
	
*/
defined('BY_JYA') or exit('Access Denied');
global $_RQ,$_AR;


$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
$return['diy']=$this->plugin_setting('diy');
$basic=$this->plugin_setting('basic');
$return['banner']=$basic['image'];
$return['basic']=$basic;
if($_RQ['op']=='main'){
	if(!$_RQ['id']){
		exi('没有找到该分类，请重新选择！','error','jy_zhongchou/index/main');
	}
	$classify=pdo_get('jy_zhongchou_classify',array('uniacid'=>$_SESSION['uniacid'],'id'=>$_RQ['id']));
	$list=pdo_getall('jy_zhongchou_project',array('uniacid'=>$_SESSION['uniacid'],'cid'=>$_RQ['id'],'status'=>0,'is_shenhe'=>1),'','paixu asc');
	
	if($list){
		$sum=count($list);
		foreach($list as &$item){
			$item['title']=cfc('tools')->substr($item['title'],0,13);
			$item['createtime']=date('Y-m-d H:i:s',$item['createtime']);
		}
	}
	$return['list']=$list;
	$return['classify']=$classify;
	$return['sum']=$sum;
	$return['sharedata']=array(
		'title'=>$classify['title'],
		'desc'=>$classify['classify_desc'],
		'link'=>custom_url('jy_zhongchou/c_detail/'),
		'imgUrl'=>ATTACHMENT_URL.$classify['classify_logo'],
	);
	set_html('title',$classify['title']);
	exi($return);
}	
